package com.icare.shop.server.feign;

import com.icare.shop.common.base.ResponseResult;
import com.icare.shop.server.fallback.TradeFallbackService;
import com.icare.shop.server.req.SubmitOrderReq;
import com.icare.shop.server.resp.GoodsResp;
import com.icare.shop.server.resp.SubmitOrderResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(value = "trade-server",fallback = TradeFallbackService.class)
public interface TradeFeignService {

    @PostMapping("v1/submitOrder")
    ResponseResult<SubmitOrderResp> submitOrder(@RequestBody SubmitOrderReq req);

    @GetMapping("v1/getShopInfo")
    ResponseResult<GoodsResp> getShopInfo(@RequestParam("id") Long id);

}
